package com.ziq.zcamp.api.service

import com.ziq.zcamp.api.request.common.MiniACodeParam
import com.ziq.zcamp.api.respond.camp.MyCampingDataRespond
import com.ziq.zcamp.api.respond.common.BannerListRespond
import com.ziq.zcamp.api.respond.common.MiniACodeRespond
import com.ziq.zcamp.api.respond.common.UploadFileRespond
import io.reactivex.Observable
import okhttp3.MultipartBody
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part
import retrofit2.http.PartMap
import retrofit2.http.QueryMap


interface CommonService {

    @GET(BANNER_LIST_API)
    fun bannerList(@QueryMap params: HashMap<String, Any>): Observable<BannerListRespond>

    @POST(MINI_A_CODE)
    fun miniACode(@Body params: MiniACodeParam): Observable<MiniACodeRespond>

    @Multipart
    @POST(UPLOAD_FILE_API)
    fun uploadFile(@Part file: MultipartBody.Part): Observable<UploadFileRespond>
}